import rxAjax from '@/assets/js/ajax.js';

//租户数据源执行记录 api接口
export const FormExecuteLogApi = {};

FormExecuteLogApi.baseUrl= '/api-form/form/core/formExecuteLog';
FormExecuteLogApi.exportUrl= FormExecuteLogApi.baseUrl + '/listExport';

//查询列表
FormExecuteLogApi.query=function (parameter) {
  var url= FormExecuteLogApi.baseUrl + '/query';
  return rxAjax.postJson(url,parameter).then (res => {
    return res.result
  })
}

/**
* 获取单记录
* @param pkId
* @returns {*}
*/
FormExecuteLogApi.get =function(pkId) {
  var url= FormExecuteLogApi.baseUrl + '/get?pkId=' + pkId;
  return rxAjax.get(url);
}

//保存数据
FormExecuteLogApi.save =function(parameter) {
  var url= FormExecuteLogApi.baseUrl + '/save';
  return rxAjax.postJson(url,parameter);
}

//删除数据
FormExecuteLogApi.del =function(parameter) {
  var url= FormExecuteLogApi.baseUrl + '/del';
  return rxAjax.postUrl(url,parameter);
}

FormExecuteLogApi.getByBatch =function(batch) {
    var url= FormExecuteLogApi.baseUrl + '/getByBatch?batch=' + batch;
    return rxAjax.get(url);
}


export  default FormExecuteLogApi;

